package com.example.javaproject.thread.juc.blockingqueue;

/**
 * Description:
 * <br>Author：tian
 * <br>Time: 2019/3/5 15:46
 */
public class BoundBufferTest {

    private static int writeNum = 3;
    private static int readNum = 3;


    public static void main(String[] args) {
        BoundedBuffer buffer = new BoundedBuffer();

        for (int i = 0; i < writeNum; i++) {
            new Thread(new BufferWriter(buffer)).start();
        }

        for (int i = 0; i < readNum; i++) {
            new Thread(new BufferReader(buffer)).start();
        }

    }
}
